from . import api
from flask import jsonify
from app import redis_client

@api.route('/hello', methods=['GET'])
def hello():
    return jsonify(code=0, msg='Hello, world!')

@api.route('/test/<name>', methods=['GET'])
def set(name: str):
    redis_client.setnx(f'user:input:{name}', '1')
    return jsonify(code=0, msg='success')